<!DOCTYPE html>
<html>
<head>
<meta charset="GBK">
<title>XMLHttpRequest.send(document) Content-Type header</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
</head>
<body>
<script>
async_test(function(t) {
  assert_equals(document.charset, "GBK");
  xhr = new XMLHttpRequest;
  xhr.open("POST", "print-content-type.cgi");
  xhr.send(document);
  xhr.onloadend = t.step_func_done(function() {
    assert_equals(xhr.responseText, "text/html;charset=UTF-8\n");
  });
});
</script>
</body>
</html>
